feat(setup): the guide's consent lands on the change, not the look [spec 03-03] - #125
Merged
Merged
Conversation
…pec 03-03]
The card's 'y' ("walk me through fixing them") already covers
investigation, yet SDK default mode re-asked for every tool call - a
wall of y/N for `which` and `--version` that buried the one confirm
that matters. cliPermission now auto-allows pure reads: the read-only
builtins (Read/Glob/Grep) and Bash commands whose every segment matches
a conservative allowlist (isReadOnlyCommand). Everything that can
mutate - installs, upgrades, Write/Edit, any unrecognized command -
still asks per action, and bypassPermissions stays forbidden.
The classifier leans strict (codex review hardened it): redirects,
backticks, and parameter expansion disqualify (only `$?` and an
allowlisted `$(...)` pass - `echo $MURMUR_TTS_API_KEY` must not slide a
credential into the transcript); secret-bearing targets (voice.json,
.env*) never auto-allow for any tool; `brew outdated` is excluded
because default Homebrew auto-updates before answering it. Auto-allows
land in the dev log.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements specs/spec03/03-03-guide-harness.md (§3 flow amendment — consent lands on the change, not the look).
What
Field testing the stale-yt-dlp repair (PR #124) surfaced real friction: the user answers
yon the checklist card ("walk me through fixing them"), and the guide then re-asks y/N for every tool call — including pure diagnostics likewhich -a yt-dlp; yt-dlp --versionandbrew info. The wall of confirms buries the one that matters (brew upgrade).cliPermissionnow auto-allows what can only look:isReadOnlyCommand): the command is split at every separator (;,&&,||,|,&, newline) and around$(...), and each segment must match a conservative allowlist (which/ls/echo/version-reads/brew info-list/uv tool list/…). One unknown head poisons the whole command → falls back to asking.Everything that can mutate — installs, upgrades, Write/Edit, anything unrecognized — keeps the per-action y/N.
bypassPermissionsremains forbidden (the red line and its guard test stand). Auto-allows are recorded in the dev log.Hardened by review (each with a regression test):
$passes only as$?or an allowlisted$(...)) soecho $MURMUR_TTS_API_KEYcannot slide a secret into the SDK transcript; secret-bearing targets (voice.json,.env*) never auto-allow for any tool — the §7.2 out-of-band secret flow stays intact.brew outdatedexcluded: default Homebrew auto-updates its own metadata before answering it — that mutates state, so it asks.Verification
pnpm test(785),pnpm run typecheck, oxlint — all green.$VAR, chained mutations,brew outdated, secret paths).AI coding brief
🤖 Generated with Claude Code